Skip to content

Lift revealed publication chips above neighboring cards (#1377)#1383

Merged
jonfroehlich merged 1 commit into
masterfrom
1377-fix-chip-overlap
Jun 23, 2026
Merged

Lift revealed publication chips above neighboring cards (#1377)#1383
jonfroehlich merged 1 commit into
masterfrom
1377-fix-chip-overlap

Conversation

@jonfroehlich

@jonfroehlich jonfroehlich commented Jun 23, 2026

Copy link
Copy Markdown
Member

Fixes #1377.

Problem

On the landing page, the horizontal publication card's .pub-download-links row (PDF/Cite/project chips) is hidden with opacity:0, which still occupies layout space. That row can extend past the card's 129px box, and the landing grid is a flex-wrap row, so a card's revealed-on-hover chips can sit over the title of the card in the row below (or, in the last row, over "SEE ALL PAPERS"). At the default stacking order the chips painted behind that content and looked tangled — the reported "sometimes the chips overlap" (the "sometimes" being the variable stack height: author count, chip count, title length).

Fix

On :hover/:focus-within, give the revealed chips position: relative and z-index: 30 so they paint cleanly on top of whatever is below them instead of tangling behind it.

.pub-column-horiz-layout:hover .pub-download-links,
.pub-column-horiz-layout:focus-within .pub-download-links {
  opacity: 1;
  position: relative;
  z-index: 30; /* clears thumbnail (10) & award banner (20) */
}
  • z-index is applied only on hover/focus, so the invisible (opacity:0) layer never sits over — and swallows clicks meant for — the card below. At-rest behavior is unchanged.
  • 30 clears the existing thumbnail (z-index:10) and award banner (z-index:20) stacking.

This fixes the layering (chips legible, on top); it intentionally doesn't reserve extra space, so the transient on-hover overlap itself remains by design.

Verification

  • Real :hover on the chip-heavy "At the Intersection…" card: revealed chips now sit cleanly on top of the content below (before/after crop to be attached).
  • a11y: no change to colors/contrast, DOM order, or keyboard reveal (:focus-within preserved). Pa11y landing-page findings are the pre-existing media-less color-contrast noise; none reference the touched selectors.
  • No Django test applies (pure CSS render bug, not reachable via the Python suite).

Screenshot

image

🤖 Generated with Claude Code

On the landing page the horizontal publication card's .pub-download-links
row (PDF/Cite/project chips) is only hidden with opacity:0, which still
occupies layout space. The row can extend past the card's 129px box, and
the landing grid is a flex-wrap row, so a card's chips can sit over the
title of the card in the row below. With everything at the default
stacking order the chips painted *behind* that content and looked
tangled.

Fix: on :hover/:focus-within, give the revealed chips position:relative
and z-index:30 so they paint cleanly on top of whatever is below them.
z-index is applied only on hover/focus, so the invisible (opacity:0)
layer never sits over — and swallows clicks meant for — the card below.
30 clears the thumbnail (z-index:10) and award banner (z-index:20).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jonfroehlich jonfroehlich merged commit ec2c20d into master Jun 23, 2026
3 checks passed
@jonfroehlich jonfroehlich deleted the 1377-fix-chip-overlap branch June 23, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sometimes the chips can overlap on landing page for publications

1 participant